﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using WorkStation.Frameworks.Core;
using WorkStation.Frameworks.Core.Extensions;

namespace WorkStation.Frameworks.EasyBus.DbModel
{
    /// <summary>
    /// 订阅信息
    /// </summary>
    [Serializable]
    public class SubscribeInfo
    {
        public string _id { get; set; }

        /// <summary>
        /// 订阅名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 总线名称
        /// </summary>
        public string BusName { get; set; }

        /// <summary>
        /// 本地队列地址
        /// </summary>
        public string Mq { get; set; }

        /// <summary>
        /// 订阅端宿主地址
        /// </summary>
        public string SubServerIp { get; set; }

        /// <summary>
        /// 订阅的消息路由关键字
        /// </summary>
        public string RouteKey { get; set; }

        /// <summary>
        /// 订阅的总线名称
        /// </summary>
        public string PubBusName { get; set; }

        /// <summary>
        /// 节点名称（用于标识负载节点）
        /// </summary>
        public string NodeName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        public SubscribeInfo()
        {
            this._id = Guid.NewGuid().ToString();
        }
    }
}
